//生成token
const jwt = require('jsonwebtoken');
const serect = 'bimiyeyou';  //密钥，不能丢
module.exports = (userinfo) => {
  const token = jwt.sign(userinfo, serect, {expiresIn: '24h'});
  return token;
};